package com.isloop;

import java.io.*;

import org.apache.commons.fileupload.FileItem;

public class FileRead {
	public String mobiles(FileItem is) {
		String text="";
		String mobiless="";
		try {
			text = is.getString();
			//String test = is.getString();
			String []mobiles = text.split("\\n");
			for(int i=0;i<mobiles.length;i++){
				if(mobiless.equals("")){
					mobiless+=mobiles[i];
				}else{
					mobiless+=","+mobiles[i];
				}
			}
			mobiless=mobiless.replaceAll("\r","");
			System.err.println(mobiless);
		} catch (Exception e) {
			System.err.println(e.getMessage());
		}
		return mobiless;
	}
}
